package edu.study.user.api;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import edu.study.api.common.dto.BaseRespDto;
import edu.study.api.common.dto.PageRespDto;
import edu.study.api.common.dto.RespDto;
import edu.study.user.api.dto.RoleDto;
import edu.study.user.api.req.role.AddRoleReq;
import edu.study.user.api.req.role.DeleteRoleReq;
import edu.study.user.api.req.role.ModifyRoleReq;
import edu.study.user.api.req.role.ModifyRoleStatusReq;
import edu.study.user.api.req.role.QueryRolePageListReq;
import edu.study.user.api.req.role.QueryRoleReq;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * 1.要么没有入参，要么封装成req对象
 * 2.返回类型：BaseRespDto RespDto<T> PageRespDto<T> 三种
 */
@RequestMapping("/api/user/roleApi")
@Api(value = "/api/user/roleApi", tags = { "角色相关接口-1.0" })
public interface RoleApi {
	
    @ApiOperation(value = "新增角色")
    @RequestMapping(value = "addRole", method = {RequestMethod.POST})
    BaseRespDto addRole(@RequestBody AddRoleReq req);
    
    @ApiOperation(value = "删除角色")
    @RequestMapping(value = "deleteRole", method = {RequestMethod.POST})
    BaseRespDto deleteRole(@RequestBody DeleteRoleReq req);
    
    @ApiOperation(value = "修改角色")
    @RequestMapping(value = "modifyRole", method = {RequestMethod.POST})
    BaseRespDto modifyRole(@RequestBody ModifyRoleReq req);
    
    @ApiOperation(value = "失效/生效")
    @RequestMapping(value = "modifyRoleStatus", method = {RequestMethod.POST})
    BaseRespDto modifyRoleStatus(@RequestBody ModifyRoleStatusReq req);
    
    @ApiOperation(value = "查询角色")
    @RequestMapping(value = "queryRole", method = {RequestMethod.POST})
    RespDto<RoleDto> queryRole(@RequestBody QueryRoleReq req);
    
    @ApiOperation(value = "分页查询角色")
    @RequestMapping(value = "queryRolePageList", method = {RequestMethod.POST})
    PageRespDto<RoleDto> queryRolePageList(@RequestBody QueryRolePageListReq req);
}
